#ifndef _MQTTCLIENT_NEWCONNECT_H_
#define _MQTTCLIENT_NEWCONNECT_H_

#include <QDialog>
#include <QMap>
#include "PublicStruct.h"

namespace Ui
{
	class NewConnect;
}
class CDataCtrl;


class CNewConnect : public QDialog
{
	Q_OBJECT
public:
	CNewConnect(CDataCtrl *pCtrl, QWidget *parent = nullptr);
	~CNewConnect();

private slots:
	void on_btnClose_clicked();
	void on_btnSave_clicked();
	void on_btnSaveAndConnect_clicked();

signals:
	void sigInsertConnect(QString strGroupId, CConnectOpt opt);

private:
	void init();

private:
	Ui::NewConnect *m_ui;
	CDataCtrl *m_pCtrl;
	QMap<int, QString> m_groupIdIndex;
};

#endif
